package com.corpgovernment.supplier.dto;

import com.corpgovernment.api.supplier.bo.suppliercompany.GetSupplierCompanyRequestBo;
import com.corpgovernment.api.supplier.bo.suppliercompany.GetSupplierProductRequestBo;
import com.corpgovernment.api.supplier.bo.suppliercompany.ListSupplierProductRequestBo;
import lombok.Data;
import org.springframework.beans.BeanUtils;

/**
 * @author jhxue
 */
@Data
public class SupplierCompanyRequest {
    private String supplierCode;
    private String productType;
    private String operateType;
    private Integer busPriType;
    private String companyCode;

    public static SupplierCompanyRequest toRequest(GetSupplierProductRequestBo requestBo) {
        SupplierCompanyRequest request = new SupplierCompanyRequest();
        BeanUtils.copyProperties(requestBo, request);
        return request;
    }

    public static SupplierCompanyRequest toRequest(ListSupplierProductRequestBo requestBo) {
        SupplierCompanyRequest request = new SupplierCompanyRequest();
        BeanUtils.copyProperties(requestBo, request);
        return request;
    }

    public static SupplierCompanyRequest toRequest(GetSupplierCompanyRequestBo requestBo) {
        SupplierCompanyRequest request = new SupplierCompanyRequest();
        BeanUtils.copyProperties(requestBo, request);
        return request;
    }
}
